﻿using HCQ2_Model.SysModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HCQ2_IDAL
{
    /// <summary>
    ///  登录记录数据层
    /// </summary>
    public partial interface IT_LoginDAL
    {
        /// <summary>
        ///  登录成功时编辑
        /// </summary>
        /// <param name="login">登录记录对象</param>
        /// <returns></returns>
        int EditLoginByOk(HCQ2_Model.T_Login login);
        /// <summary>
        ///  登录失败时编辑
        /// </summary>
        /// <param name="login">登录记录对象</param>
        /// <returns></returns>
        int EditLoginByError(HCQ2_Model.T_Login login);
        /// <summary>
        ///  添加记录
        /// </summary>
        /// <param name="login">登录记录对象</param>
        /// <returns></returns>
        int AddLoginInfo(HCQ2_Model.T_Login login);
        /// <summary>
        ///  获取登录日志
        /// </summary>
        /// <param name="keyword">关键字</param>
        /// <param name="orgUnit">单位</param>
        /// <param name="page">第几页</param>
        /// <param name="size">每页数</param>
        /// <param name="status">状态</param>
        /// <returns></returns>
        List<UserLoginLog> GetLoginLogData(string keyword,string orgUnit,int page,int size,int status, string loginSource, string orderColumn, string orderType, out int total);
        /// <summary>
        ///  获取登录详情
        /// </summary>
        /// <param name="user_id"></param>
        /// <returns></returns>
        List<LoginDetialModel> GetLoginDetialList(int user_id, int page, int size, out int total);
        /// <summary>
        ///  获取最后一次登录code
        /// </summary>
        string GetLoginLogCode(int user_id);
    }
}
